# _*_coding:utf-8_*_
# Author   :luoyuan 
# Date     :2019/1/5 11:30  

class Chinese:
    country='China'
    def __init__(self,name):
        self.name=name

    def play_ball(self,ball):
        print('%s正在打%s' %(self.name))
print(Chinese.country)

#修改
Chinese.country='Japan'
print(Chinese.country)
p1=Chinese('alex')
print(p1.__dict__)
print(Chinese.country)

#增加
Chinese.dang="minzhu"
print(Chinese.dang)
print(p1.dang)

#删除
del Chinese.dang
del Chinese.country
print(Chinese.__dict__)

def eat_food(self,food):
    print('%s 正在吃%s'%(self.name,food))

#增加方法
Chinese.eat=eat_food
print(Chinese.__dict__)
p1.eat("西瓜")

#修改方法
def test(self):
    print("test")
Chinese.play_ball=test
p1.play_ball()
Chinese.play_ball(p1)
